package com.bigwolf.system.config;

import org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.core.Ordered;
import org.springframework.core.PriorityOrdered;

@Configuration
// 表示通过aop框架暴露该代理对象,AopContext能够访问
//@EnableAspectJAutoProxy(exposeProxy = true)
public class AopConfig {
//    @Bean
//    public static AnnotationAwareAspectJAutoProxyCreator aopProxyCreator() {
//        AnnotationAwareAspectJAutoProxyCreator creator = new AnnotationAwareAspectJAutoProxyCreator();
//        creator.setProxyTargetClass(true);
//        creator.setExposeProxy(true);
//        creator.setOrder(Ordered.HIGHEST_PRECEDENCE);
//        return creator;
//    }
}
